<template>
    <h3>URL REST 参数</h3>
    <input type="button" value="printParams" @click="printParams()">
    <p>$route.params:{{ $route.params }}</p>
    <p>$route.params.username:{{ $route.params.username }}</p>
    <p>$route.params.password:{{ $route.params.password }}</p>
</template>

<script>
    export default {
        methods: {
            printParams() {
                console.log("this.$route.params:",this.$route.params); 
                console.log("this.$route.params.username:",this.$route.params.username); 
                console.log("this.$route.params.password:",this.$route.params.password); 
            }
        },
    }
</script>

<style lang="scss" scoped>

</style>